/**
 * elancom Corporation copy right 2012 - 2015  
 *   
 * $Header: https://192.168.1.224/svn/elancom/product/elancom-platform/trunk/src/main/java/com/elancom/framework/component/validate/AbstractValidator.java 1094 2012-07-06 12:08:51Z lanzhouxue $
 * $Id: AbstractValidator.java 1094 2012-07-06 12:08:51Z lanzhouxue $
 * $Author: lanzhouxue $
 * $Date: 2012-07-06 20:08:51 +0800 (Fri, 06 Jul 2012) $
 * $Revision: 1094 $
 */
package com.elancom.framework.component.validate;

import com.elancom.framework.component.ComponentException;
import com.elancom.framework.component.ComponentInvoker;
import com.elancom.framework.component.ComponentConstants;
import com.elancom.framework.component.Input;
import com.elancom.framework.component.InputFactory;
import com.elancom.framework.component.Output;

/**
 * @author elancom
 * @date 2012-6-12
 */
public abstract class AbstractValidator implements Validator, ComponentConstants {
	protected ComponentInvoker componentInvoker;

	protected InputFactory inputFactory;

	/**
	 * @return the ComponentInvoker
	 */
	public ComponentInvoker getComponentInvoker() {
		return componentInvoker;
	}

	/**
	 * @param ComponentInvoker
	 *            the ComponentInvoker to set
	 */
	public void setComponentInvoker(ComponentInvoker componentInvoker) {
		this.componentInvoker = componentInvoker;
	}

	@Override
	public void validate(Input input, Output output) throws ComponentException {
	}

	/**
	 * @return the inputFactory
	 */
	public InputFactory getInputFactory() {
		return inputFactory;
	}

	/**
	 * @param inputFactory
	 *            the inputFactory to set
	 */
	public void setInputFactory(InputFactory inputFactory) {
		this.inputFactory = inputFactory;
	}

	protected Input createInput() {
		return inputFactory.create();
	}
}
